{% extends "common/layout_main.html" %}
{% block content %}
    <div class="row  border-bottom">
        <div class="col-lg-12">
            {% include 'common/tab_finance.html' %}
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <form class="form-inline wrap_search">
                <div class="row  m-t p-w-m">
                   {% include 'common/search_status.html' %}
                </div>
            </form>
            <hr>
            <table class="table table-bordered m-t">
                <thead>
                <tr>
                    <th>订单编号</th>
                    <th>名称</th>
                    <th>价格</th>
                    <th>支付时间</th>
                    <th>状态</th>
                    <th>创建时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {% if pagination.items %}
                    {% for pay_order in pagination.items %}
                        <tr>
                            <td>{{ pay_order.order_sn }}</td>
                            <td>
                                {% for food in order_food_mapping[pay_order.id] %}
                                    {% for name,number in food.items() %}
                                         {{ name}}×{{ number }}&nbsp;&nbsp;
                                    {% endfor %}
                                {% endfor %}
                            </td>
                            <td>{{ pay_order.pay_price }}</td>
                            <td>{{ pay_order.pay_time }}</td>
                            <td>{{ pay_order.status_desc }}</td>
                            <td>{{ pay_order.created_time }}</td>
                            <td>
                                <a href="{{ buildUrl('/finance/pay-info') }}?id={{ pay_order.id }}">
                                    <i class="fa fa-eye fa-lg"></i>
                                </a>
                            </td>
                        </tr>
                    {% endfor %}
                {% else %}
                    <tr>
                        <td colspan="7">暂无数据</td>
                    </tr>
                {% endif %}
                </tbody>
            </table>
            <!--分页代码已被封装到统一模板文件中-->
           {% include 'common/pagenation.html' %}
        </div>
    </div>
{% endblock %}
{% block js %}
    <script src="{{buildStaticUrl('/js/finance/index.js') }}"></script>
{% endblock %}